<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // for 遍历数组 break 
        // for..in 遍历对象
        // forEach 简化for循环，缺点：不能提前中止循环 
        // for...of 不用引入新的变量i 

        var arr = [2, 3, 4]
        // for (var i = 0; i < arr.length; i++) {
        //     console.log(arr[i]);
        // }
        for (var item of arr) {
            console.log(item);
        }



    </script>
</body>

</html>